<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Final//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
<TITLE>Type TObjectClickEvent</TITLE>
<link rel="stylesheet" type="text/css" href="help.css">
</HEAD>

<BODY class="v117">

<H1><A NAME="type_tobjectclickevent"></A><B>Type TObjectClickEvent</B></H1>
<HR>

<H2 class="Declaration">Declaration</H2>

<P>TObjectClickEvent = procedure(Sender, Obj: TObject; const OnClick: string) of Object;</P>

<H2 class="Description">Description</H2>

<P>The TObjectClickEvent type is the type for <A HREF="onobjectclick_event.htm">OnObjectClick</A> events.  These events occur when the mouse is clicked on an Object.</P>

<P>In the above, <I>Sender</I> is the <A HREF="thtmlviewer_component.htm">THtmlViewer</A> where the Object is located and <I>Obj</I> is a pointer to the clicked object.  <I>OnClick</I> is the string assigned to the OnClick attribute of the object's HTML tag.</P>

<P>Form controls currently support the <A HREF="onobjectclick_event.htm">OnObjectClick</A> event.  These objects are descendents of TFormControlObj.  In particular, the <B>TheControl</B> property can give access to the underlying Delphi controls, such as <B>TButton</B>, <B>TRadiobutton</B>, and <B>TCheckbox</B> with code similar to:</P>

<PRE>if (Obj is TFormControlObj) then
    with TFormControlObj(Obj) do
        if (TheControl is TButton) then 
            .....</PRE>
<OBJECT TYPE="application/x-oleobject" CLASSID="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
	<PARAM NAME="Keyword" VALUE="AttributeValue Property">
</OBJECT>

<P>TFormControlObj's base class THtmlNode also has an <B>AttributeValue Property</B> with which special user attributes can be accessed:</P>

<PRE>if (Obj is THtmlNode) then
    AttrValue := THtmlNode(Obj).AttributeValue['MyAttr'];</PRE>

<P><B>See also:</B></P>

<P><A HREF="onobjectclick_event.htm">OnObjectClick Event</A></P>

<P><A HREF="onimageclick_event.htm">OnImageClick Event</A></P>

</BODY>
</HTML>
